package com.wyh.springcloud.service.impl;

import com.wyh.springcloud.dao.PaymentMapper;
import pojo.Payment;
import com.wyh.springcloud.service.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author wyh
 * @version 1.0
 * @date 2021/11/2 16:35
 */
@Service
public class PaymentServiceImpl implements PaymentService {

    @Autowired
    private PaymentMapper paymentMapper;


    @Override
    public int addPayment(Payment payment) {
        return paymentMapper.addPayment(payment);
    }

    @Override
    public List<Payment> findAll() {
        return paymentMapper.findAll();
    }

    @Override
    public Payment getPaymentById(Long id) {
        return paymentMapper.getPaymentById(id);
    }
}
